//
//  Game2048.m
//  Game2048
//
//  Created by tarena on 16/3/18.
//  Copyright © 2016年 tarena. All rights reserved.
//

#import "Game2048.h"
#import "MainViewController.h"


@interface Game2048 ()

@property (nonatomic ,strong) MainViewController *mainVC;


@end

@implementation Game2048

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
    self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
    _mainVC = [[MainViewController alloc]init];
    self.window.rootViewController = _mainVC;
    self.window.backgroundColor = [UIColor colorWithWhite:0.88 alpha:1.0];
    [self.window makeKeyAndVisible];
    return YES;
}

-(void)applicationDidEnterBackground:(UIApplication *)application{
    
    NSLog(@"程序进入后台");
    [_mainVC didReceiveMemoryWarning];
    //一旦进入后台立即将数据保存一份
    
}

/** 禁止屏幕旋转 */
-(UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{
    return UIInterfaceOrientationMaskPortrait;
}

@end
